package sctu.edu.java.year2016.team01.xuhanmei.day20160529.AnonyMity;

/**
 * Created by Administrator on 2016/5/29.
 */
public class OutString {
    public static void main(String[] args) {


        final String sourceStr = "你是 学霸 你 说啥 都好听";
        StringDeal s = new StringDeal() {
            @Override
            public String filterblank() {
                String convertStr = sourceStr;
                convertStr = convertStr.replaceAll(" ", "");
                return convertStr;
            }
        };//在匿名内部类定义结束后需要加分号标识符，这个分号不代表内部类结束，而是创建匿名内部类
        //引用表达式的标识


        System.out.println("原字符串为：" + sourceStr);
        System.out.println("转换后的字符串为：" + s.filterblank());
    }
}
